package com.chixing.day03_oop;

public class PersonTest {
    public static void main(String[] args) {
        Person person1= new Person();
        person1.setPersonName("老花");
        person1.setPersonAge(24);
        person1.setPersonGender("女");
        person1.setPersonMarry("已婚");

        Person person2=new Person();
        person2.setPersonName("菊菊");
        person2.setPersonAge(34);
        person2.setPersonGender("男");
        person2.setPersonMarry("未婚");

        if (person1.getPersonGender()!= person2.getPersonGender()&&
                person1.getPersonAge()>=22&&person2.getPersonAge()>=24&&
                !person2.getPersonMarry()&&!person2.getPersonMarry()) System.out.println("可以结婚");
        else System.out.println("不能结婚");
    }




}
